<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .row {
        display: flex;
        align-items: center; /* 垂直居中 */
      }

      .row {
        display: flex;
        align-items: center; /* 垂直居中 */
      }

      .box {
        width: 80px;
        height: 50px;
        background: #4caf50;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
      }

      /* 虚线连接段 */
      .dash {
        /* flex:0 0 30px;       */
        height: 0; /* 本身不占用高度 */
        border-top: 2px dashed #666; /* 虚线：2px粗、颜色#666 */
        margin: 0 6px; /* 与盒子留空隙 */
        flex: 1;
      }
    </style>
  </head>

  <body>
    <div class="row">
      <div class="box">A</div>
      <span class="dash"></span>

      <div class="box">B</div>
      <span class="dash"></span>

      <div class="box">C</div>
    </div>
  </body>
</html>
